<template>
    <div>
        <div class="loan_nav col_nav">
            <ul>
                <li><a href="javascript:history.go(-1)"><i class="iconfont">&#xe61e;</i></a></li>
                <li><p>成功案例</p></li>
                <li></li>
            </ul>
        </div>
        <div class="interval_T">
                    
        </div>
        <div>
			<swiper :list="imgList" :show-dots="false" loop auto :aspect-ratio="0.3" dots-position="center" dots-class="custom-bottom"></swiper>
		</div>
        <div class="case_detail">
            <ul v-for="l in list">
                <li>
                    <ul>
                        <li><p>{{l.userName}}</p></li>
                        <li><p>贷款：</p></li>
                        <li><p>{{l.loansMoney}}</p></li>
                        <li><p>服务评价</p></li>
                        <li><i class="iconfont col-r1">&#xe694;</i></li>
                    </ul>
                </li>
                <li>
                    <p>{{l.loansCause}}</p>
                </li>
            </ul>
        </div>
    </div>
</template>
<script>
export default {
	data() {
		return {
			list: [],

			imgList: []
		}
	},
	created() {
		this.query()
		this.queryImg()
	},
	methods: {
		query() {
			this.$http.get('/app/index/applyList', {
				params: { page: 1, limit: 100 }
			}).then(json => {
				const { code, page } = json
				if(code === 0) {
					this.list = page.list
				}
			})
		},

		queryImg() {
			this.$http.get('/app/index/carousel', {
				params: { page: 'successcase' }
			}).then(json => {
				const { code, carousel } = json
				if (code === 0) {
					carousel.forEach(n => {
						this.imgList.push({
							url: n.url,
							img: n.imgPath
						})
					})
				}
			})
		}
	}
}
</script>

